﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AdvanceGridSearchCrm2013
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            string fetch = @"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"
  + "<entity name='contact'>"
  + " <attribute name='fullname' />"
    + "<attribute name='telephone1' />"
    + "<order attribute='fullname' descending='false' />"
 + " </entity>"
+ "</fetch>";
            AdVancedCrmSearch.Fetch_xml = fetch;
            Dictionary<string,string> ColumnsHeaderAndMaps =new Dictionary<string,string>();
            if (ColumnsHeaderAndMaps.Keys.Contains("fullname")==false)
            {
                ColumnsHeaderAndMaps.Add("fullname", "full name");
            }
            if (ColumnsHeaderAndMaps.Keys.Contains("telephone1") == false)
            {
                ColumnsHeaderAndMaps.Add("telephone1", "telephone  number");
            }
            AdVancedCrmSearch.ColumnsHeaderAndMaps = ColumnsHeaderAndMaps;
        }
    }
}